import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'

@Component({
  selector: 'app-mall-shop',
  templateUrl: './mall-shop.component.html',
  styleUrls: ['./mall-shop.component.scss']
})
export class MallShopComponent implements OnInit {

  constructor(public router: Router) { }

  ngOnInit(): void {

    $(function () {
      var _img_w = $(".zy_supplier_box .name_bg h2 img").width()
      var _img_h = _img_w * 21 / 64
      $(".zy_supplier_box .name_bg h2 img").css("height", _img_h)
    })



    var swiper = new Swiper('.zy_banner_dianp', {
      pagination: {
        el: '.swiper-pagination',
      },
      autoplay: {
        delay: 3000,
        stopOnLastSlide: false,
        disableOnInteraction: true,
      },
    });



    $(function () {
      $('.vehicle_xinx_1 .chak').mousedown(function () {
        var Div1 = $('.vehicle_xinx_1 .hide').css('display');
        if (Div1 == 'none') {
          $('.vehicle_xinx_1 .hide').show();
          $('.vehicle_xinx_1 .chak i').addClass('no');
        } else {
          $('.vehicle_xinx_1 .hide').hide();
          $('.vehicle_xinx_1 .chak i').removeClass('no');
        }
      })
    })



    // banner
    var swiper = new Swiper('.banner_shouy', {
      pagination: {
        el: '.lunbo_banner',
        type: 'fraction',
      },
      autoplay: {
        delay: 3000,
        stopOnLastSlide: false,
        disableOnInteraction: true,
      },
    });
  }

  getmallShop() {
    this.router.navigate(['/mall-shop'])
  }
  getmallShopXq() {
    this.router.navigate(['/mall-shop-xq'])
  }
  getmallShopClass() {
    this.router.navigate(['/mall-shop-class'])
  }

}
